import request from '@/utils/request'

import variable from '@/utils/variables'
const baseURL = variable.URL.baseURL

// 获取PC 专业市场
export function getMarketVirtual(params) {
    return request({
        baseURL: baseURL,
        url: '/extend/pc_market_virtual/select_data',
        method: 'GET',
        params:params
    })
}

//精选市场列表
export function getMarketHotList(params) {
    return request({
        baseURL: baseURL,
        url: '/markets/hot/list',
        method: 'GET',
        params:params
    })
}

//市场列表
export function getMarketList(params) {
    return request({
        baseURL: baseURL,
        url: '/search/market/search',
        method: 'GET',
        params:params
    })
}

//市场详情
export function getMarketDetail(params) {
    return request({
        baseURL: baseURL,
        url: '/markets/select_one',
        method: 'GET',
        params:params
    })
}

//市场banner
export function bannerList(params) {
    return request({
        baseURL: baseURL,
        url: '/extend/content/market_list',
        method: 'GET',
        params:params
    })
}

//市场品类详情
export function getClassifyDetail(params) {
    return request({
        baseURL: baseURL,
        url: '/category-product/market_major_pc/select_market_major_floor',
        method: 'GET',
        params:params
    })
}

//市场热卖
export function searchProduct(params) {
    return request({
        baseURL: baseURL,
        url: '/search/product/search',
        method: 'GET',
        params:params
    })
}

//最新入驻云工厂
export function factoryRecommend(params) {
    return request({
        baseURL: baseURL,
        url: '/search/factory/search/recommend',
        method: 'GET',
        params:params
    })
}

//市场类目查询
export function getCategoryList(params) {
    return request({
        baseURL: baseURL,
        url: '/search/product/search/category',
        method: 'GET',
        params:params
    })
}

//市场云工厂数量
export function factoryCount(params) {
    return request({
        baseURL: baseURL,
        url: '/factory/frontend/factory/select_count_by_marketId',
        method: 'GET',
        params:params
    })
}

//市场列表
export function getMarketSearch(params) {
    return request({
        baseURL: baseURL,
        url: '/markets/search',
        method: 'GET',
        params:params
    })
}

//获取市场二级类目下三级
export function getMarketPcTrade(params) {
    return request({
        baseURL: baseURL,
        url: '/category/market_pc_trade',
        method: 'GET',
        params:params
    })
}